package com.xunshangwang.pinhaohuo.ui.fragments;



import android.support.v4.app.Fragment;
import android.view.View;

import com.xunshangwang.pinhaohuo.app.MainApplication;
import com.xunshangwang.pinhaohuo.http.HttpTool;


/**
 * Created by xzp on 15/9/17.
 */
public abstract class BaseFragment extends Fragment {

    public final MainApplication getMainApplication()
    {
        return (MainApplication) getActivity().getApplication();
    }

    @Override
    public void onDestroyView() {
        HttpTool.cancelRequests(getView());
        super.onDestroyView();
    }
}
